package com.xiaoqi.api.service.Impl;

import com.xiaoqi.api.mapper.UserMapper;
import com.xiaoqi.api.service.UsersService;
import com.xiaoqi.api.vo.UserVO;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;

import javax.annotation.Resource;

@Service
@Component
public class UsersServiceImp implements UsersService {

    @Resource
    UserMapper userMapper;


    @Override
    public UserVO login(String loginName, String password) {
        //密码加密
//        password = DigestUtils.md5DigestAsHex(password.getBytes());
        return userMapper.login(loginName,password);
    }
}
